using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Workspace
{
    /// <summary>
    /// <para>Create Spatial Type</para>
    /// <para>Adds the ST_Geometry SQL type, subtypes, and functions to an Oracle or a PostgreSQL database. This allows you to use the ST_Geometry SQL type to store geometries in a database that does not contain a geodatabase. You can also use this tool to upgrade the existing ST_Geometry type, subtypes, and functions in an Oracle or a PostgreSQL database.</para>
    /// <para>将ST_Geometry SQL 类型、子类型和函数添加到 Oracle 或 PostgreSQL 数据库。这允许您使用 ST_Geometry SQL 类型将几何存储在不包含地理数据库的数据库中。您还可以使用此工具升级 Oracle 或 PostgreSQL 数据库中的现有ST_Geometry类型、子类型和函数。</para>
    /// </summary>    
    [DisplayName("Create Spatial Type")]
    public class CreateSpatialType : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateSpatialType()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_database">
        /// <para>Input Database Connection</para>
        /// <para>The input_database is the database connection file (.sde) that connects to the Oracle or PostgreSQL database. You must connect as a database administrator user; in Oracle, you must connect as the sys user.</para>
        /// <para>input_database是连接到 Oracle 或 PostgreSQL 数据库的数据库连接文件 （.sde）。您必须以数据库管理员用户身份进行连接;在 Oracle 中，您必须以 sys 用户身份进行连接。</para>
        /// </param>
        /// <param name="_sde_user_password">
        /// <para>SDE User Password</para>
        /// <para>The password for the sde database user. If the sde user does not exist in the database, it will be created and will use the password you provide. The password policy of the underlying database will be enforced. If the sde user already exists in the database or database cluster, this password must match the existing password.</para>
        /// <para>sde 数据库用户的密码。如果数据库中不存在 sde 用户，则将创建该用户并使用您提供的密码。将强制执行基础数据库的密码策略。如果数据库或数据库集群中已存在 sde 用户，则此密码必须与现有密码匹配。</para>
        /// </param>
        public CreateSpatialType(object _input_database, object _sde_user_password)
        {
            this._input_database = _input_database;
            this._sde_user_password = _sde_user_password;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Create Spatial Type";

        public override string CallName => "management.CreateSpatialType";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_input_database, _sde_user_password, _tablespace_name, _st_shape_library_path, _out_workspace];

        /// <summary>
        /// <para>Input Database Connection</para>
        /// <para>The input_database is the database connection file (.sde) that connects to the Oracle or PostgreSQL database. You must connect as a database administrator user; in Oracle, you must connect as the sys user.</para>
        /// <para>input_database是连接到 Oracle 或 PostgreSQL 数据库的数据库连接文件 （.sde）。您必须以数据库管理员用户身份进行连接;在 Oracle 中，您必须以 sys 用户身份进行连接。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Database Connection")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_database { get; set; }


        /// <summary>
        /// <para>SDE User Password</para>
        /// <para>The password for the sde database user. If the sde user does not exist in the database, it will be created and will use the password you provide. The password policy of the underlying database will be enforced. If the sde user already exists in the database or database cluster, this password must match the existing password.</para>
        /// <para>sde 数据库用户的密码。如果数据库中不存在 sde 用户，则将创建该用户并使用您提供的密码。将强制执行基础数据库的密码策略。如果数据库或数据库集群中已存在 sde 用户，则此密码必须与现有密码匹配。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("SDE User Password")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _sde_user_password { get; set; }


        /// <summary>
        /// <para>Tablespace Name</para>
        /// <para>For Oracle, you can provide the name for a tablespace to be set as the default tablespace for the sde user. If the tablespace does not already exist, it will be created in the Oracle default storage location. If a tablespace with the specified name already exists, it will be set as the sde user's default.</para>
        /// <para>对于 Oracle，您可以为要设置为 sde 用户的缺省表空间的表空间提供名称。如果表空间尚不存在，则将在 Oracle 默认存储位置创建该表空间。如果已存在具有指定名称的表空间，则该表空间将设置为 sde 用户的缺省值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tablespace Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _tablespace_name { get; set; } = null;


        /// <summary>
        /// <para>ST_Geometry Shape Library Path</para>
        /// <para>For Oracle, provide the location on the Oracle server where you placed the st_shape library.</para>
        /// <para>对于 Oracle，请提供您在 Oracle 服务器上放置 st_shape 库的位置。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("ST_Geometry Shape Library Path")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _st_shape_library_path { get; set; } = null;


        /// <summary>
        /// <para>Output Workspace</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Workspace")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_workspace { get; set; }


        public CreateSpatialType SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}